<title>Evars</title>
<h1>Evars</h1>
This lesson is a little more advanced...<br>
Unless you want to customize the theme, or the Popup, then you can skip over
this lesson for now. Just click<br>
<b>Popup &#62; Take the tutorial!</b><br>
To see this tutorial at any time.
<br>
<b>Evars</b> are the backbone of LiteStep. Everything that LiteStep does is defined by evars (with a few exceptions). Almost every line in any RC file is an evar definition, unless:
<ul>
	<li>It starts with a '*' (e.g. *Popup Blah Blah.exe)</li>
		<ul><li>These are special lines that have non-standard implementations. You'll have to look at the module documentation for these (with the exception of *Popup lines, covered in the <a href="#" onclick="GotoTutorialPage(3)">Popup</a> Tutorial</li></ul>
	<li>It starts with ';' (e.g. ;This does stuff)</li>
		<ul><li>Lines like this are <b>comment</b> lines. they provide some kind of information to the person reading the rc files, and are ignored by the parser.</li></ul>
	<li>It starts with 'include' (e.g. include $Themedir$Basic.rc)</li>
		<ul><li>This 'includes', or adds, another file to the config. LiteStep basically finds all these lines, makes one big file in memory, then parses that file when loading.</li></ul>
	<li>It starts with 'IF', 'Else', or 'ENDIF'</li>
		<ul><li>Should be fairly self-explanatory. Only parses the code between the "IF" and "ENDIF" if the condition specified in the IF declaration is true. You can read the LiteStep release docs for this one.</li></ul>
</ul>
Evars are referred to with $ signs encasing the evar, like this:
<div class="code">
SomeSecondEvar    $FirstEvar$
</div>
In this case, the second evar would contain the value of the first evar, whatever that value may be defined as.

So say you opened up "Basic.rc" in the themedir of the default theme, "Demo". It might look something like this:
<div class="code">
;[ Includes the RC files in the config
include				"$themedir$Basic.rc"
include 			"$themedir$Popup.rc"
include				"$themedir$ConfigPopup.rc"
include				"$themedir$Taskbar.rc"
include				"$themedir$Systray.rc"
include				"$themedir$desktop.rc"
include				"$themedir$other.rc"
IF ShowStats = True
include				"$themedir$stats.rc"
ENDIF
include				"$themedir$memory.rc"
*LuaFile			"$themedir$memory.lua"
*LuaFile			"$themedir$Scripting.lua"
;]

;[ Define some global theme variables
BorderColor			000000
BaseColor			FFFFFF
FontColor			000000
Transparency		155
Bevels				1 1 1 1
ShapeType			.rounded
RoundedEdges		3 2
AlwaysOnTop			True
Font				MS Sans Shief
None		$themedir$images\transparent.png
;]
</div>
<ul>
	<li>The first line is a comment, it is ignored by the parser.</li>
	<li>The next 7 lines include required files for the theme. Their names should explain what they do, and if you want to customize that part of the theme, that's where you should look.</li>
	<li>A Simple "IF" statement. Note that variables must be defined at the time of parsing to work in RC files (So variables exported by modules will not work in these IF statements)</li>
	<li>Including the Lua files used by this theme (for anything dynamic, such as the auto-expanding tray)</li>
	<li>Here, we are defining some evars! These evars are used in other files, such as taskbar.rc, for that modules settings. So, changing the evars here will change the settings throughout the theme.</li>
</ul>

<h2>Basics: Changing the programs used for various functions</h2>
If you use a different browser other than FireFox, such as chrome or opera, then you can change that in one place, and have LiteStep automatically change it all over. The way to do this is by changing the value of evars in <a href="../../Personal/Evars.rc">Evars.rc</a> (Found in /App/Litestep/Personal/Evars.rc). Your Evars.rc might look something like this:
<div class="code">
;------------------------------------------------------------------------------
;    Edit *only* the paths as needed, and leave the file's *FORMAT* unchanged
;------------------------------------------------------------------------------
; path to your portable apps directory
PA "$LSD$PortableApps\"
FileManager ""
FMName "None"
TxtEditor "$PA$Notepad++Portable\Notepad++Portable.exe"
TxtEditorName "Notepad++"
CmdPrompt "E:\WINDOWS\system32\cmd.exe"
AudioPlayer "$PA$VLCPortable\VLCPortable.exe"
MediaPlayer "$PA$VLCPortable\VLCPortable.exe"
GfxViewer "rundll32.exe E:\WINDOWS\system32\shimgvw.dll,ImageView_Fullscreen"
GfxEditor "$PA$GIMPPortable\GIMPPortable.exe"
Browser "$PA$FirefoxPortable\FirefoxPortable.exe"
Browsername "Firefox"
DUN "E:\WINDOWS\system32\rasphone.exe"
Email "$PA$ThunderbirdPortable\ThunderbirdPortable.exe"
EmailName "ThunderBird"
IRC "$PA$PidginPortable\PidginPortable.exe"
FTP "$PA$FirefoxPortable\FirefoxPortable.exe"
IM "$PA$PidginPortable\PidginPortable.exe"
IMName "Pidgin"
Tutorial "$LiteStepDir$Tutorial\Tutorial.exe"

;------------------------------------------------------------------------------
;    Add and define any additional evars you require
;------------------------------------------------------------------------------

;MiscApp       "C:\E:\Program Files\misc\app.exe
</div>
Simple to change, all you have to do is replace "$PA$FirefoxPortable\FirefoxPortable.exe" with something like "$PA$ChromePortable\ChromePortable.exe", where $PA$ refers to the portableapps directory. (you can also use $LSD$ to make the path relative to the drive root).

You probably also want to change the name of the browser, so change "Firefox" to "Chrome", for example.

To see your changes, simply recycle LiteStep.